package com.redmaple.service;

import com.redmaple.entity.User;
import com.redmaple.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public List<User> findUser() {
        return userMapper.findUser();
    }

    public String insertUser(String name, Integer age) {
        userMapper.insertUser(name, age);
        return "success";
    }

}
